//
//  BaseView.m
//  MUBATE
//
//  Created by sunbin on 2017/2/14.
//  Copyright © 2017年 Quanli. All rights reserved.
//

#import "BaseView.h"

@implementation BaseView

-(void)awakeFromNib{
    [super awakeFromNib];
    [self Background];
    self.backgroundColor = [UIColor blackColor];
    [self touchEven];
}


- (void)Background{
    
    UIImage *image = LOADIMAGE(@"background", @"png");
    self.layer.contents = (id) image.CGImage;
    
    self.layer.backgroundColor = [UIColor whiteColor].CGColor;
}

// 点击view 结束第一响应endEditing
- (void)touchEven{
    WEAKSELF;
    [self addTapGestureRecognizer:^(UITapGestureRecognizer *recognizer, NSString *gestureId) {
    [weakSelf endEditing:YES];
    }];
}



@end
